package org.janusproject.acl;

import java.sql.Date;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Properties;

import org.janusproject.kernel.address.AgentAddress;

/**
 * This interface describes the Envelope of a given ACL Message as defined by FIPA.
 * 
 * @see <a href="http://www.fipa.org/specs/fipa00085/SC00085J.html">FIPA Agent Message Transport Envelope Representation</a>
 * 
 * @author Mickael Adeline
 * @author Kevin Le Roy
 * @author Paul Talagrand
 */
public interface ACLMessageEnvelope
{
	/**
	 * Gets the list of recipients of the ACL Message. 
	 */
	public Collection<AgentAddress> getTo();
	
	/**
	 * Sets the list of recipients of the ACL Message. 
	 * @param addresses is a collection of {@link AgentAddress}
	 */
	public void setTo(Collection<AgentAddress> addresses);
	
	/**
	 * Gets the agent address of the sender of the ACL Message.
	 */
	public AgentAddress getFrom();
	
	/**
	 * Sets the sender of the ACL Message. 
	 * @param address is an {@link AgentAddress}
	 */
	public void setFrom(AgentAddress address);
	
	/**
	 * Gets the ACL Representation of the content of the ACL Message.
	 */
	public String getAclRepresentation();
	
	/**
	 * Sets the ACL Representation of the content of the ACL Message.
	 */
	public void setAclRepresentation(String aclRepresentation);
	
	/**
	 * Gets the Date of the ACL Message.
	 */
	public Date getDate();
	
	/**
	 * Sets the date of the ACL Message.
	 * @param date
	 */
	public void setDate(Date date);
	
	/**
	 * Gets the comments of the ACL Message.
	 * @return the comments
	 */
	public String getComments();
	
	/**
	 * Sets the comments of the ACL Message.
	 * @param comments
	 */
	public void setComments(String comments);
	
	/**
	 * Gets the length of the payload of the ACL Message.
	 */
	public Long getPayloadLength();
	
	/**
	 * Sets the length of the payload of the ACL Message.
	 * @param payloadLength
	 */
	public void setPayloadLength(Long payloadLength);
	
	/**
	 * Gets the encoding of the payload of the ACL Message.
	 */
	public String getPayloadEncoding();

	/**
	 * Gets the encoding of the payload of the ACL Message.
	 * @param payloadEncoding
	 */
	public void setPayloadEncoding(String payloadEncoding);
	
	/**
	 * Gets the list of intended receivers of the ACL Message.
	 */
	public ArrayList<AgentAddress> getIntendedReceiver();
	
	/**
	 * Sets the list of intended receivers of the ACL Message.
	 * @param intendedReceivers is a list of {@link AgentAddress}
	 */
	public void setIntendedReceiver(ArrayList<AgentAddress> intendedReceivers);
	
	/**
	 * Gets the transport behaviour used to send and receive this ACL Message.
	 */
	public Properties getTransportBehaviour();
	
	/**
	 * Sets the transport behaviour used to send and receive this ACL Message.
	 * @param transportBehaviour
	 */
	public void setTransportBehaviour(Properties transportBehaviour);
    
    
}
